<?php

namespace ctrl;

use libs\view;
use model\article;

class contentcount extends base
{
	private static $M;
	public static function Init()
	{
		parent::init();
		self::$M = new article;
	}

	public static function index()
	{
		if (isset($_GET['list_json'])) {
			$js = [];
			$js['code'] = 0;
			$js['msg'] = 'ok';
			$js['data'] = self::$M->findCount();
			exit(json_encode($js));
		} else {
			//P(self::$M->findCount());
			view::display();
		}
	}
}
